package field;

import player.Player;

public abstract class Ownable extends Field {
	protected int price, pawnPrice, rent;
	protected Player owner;
	protected boolean pawned;
	
	
	public Ownable(String title, String subtitle, String desc, int price, int fieldnmb, int pawnPrice, int rent){
		super(title,subtitle,desc, fieldnmb);
		this.price=price;
		this.pawnPrice=pawnPrice;
		this.rent=rent;
	}
	
	public int getPrice(){
		return price;
	}
	
	
	public int getRent(){
		return rent;
	}
	
	/**
	 * Returnerer ejeren af feltet.
	 */
	public Player getOwner(){
		return this.owner;
	}
	
	/**
	 * Sætter en spiller som ejer af feltet
	 * @param spiller Spilleren som skal eje feltet
	 * @param fieldNumber Feltets placering på GUIen (typisk identisk med spillerens position +1).
	 * @return 
	 */
	public void setOwner(Player player){
		this.owner = player;
	}

	public int getPawnPrice() {
		return pawnPrice;
	}
	
	public boolean getPawned(){
		return pawned;
	}
	
	public void setPawned(boolean pawned){
		this.pawned = pawned;
	}
	
	
}
